<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fhj="http://java.sun.com/jsf/composite/fhj"
	template="/resources/templates/template.xhtml">
	<ui:param name="pageTitle" value="Login" />
	<ui:define name="content">
		<h:form id="loginpage">
			<h2>Login:</h2>
			<h:panelGrid columns="3" id="login">
				<h:outputLabel for="username" value="Username:" />
				<p:inputText id="username" value="#{loginHelper.username}" />
				<p:message for="username" />
				
				<h:outputLabel for="password" value="Password:" />
				<p:password id="password" value="#{loginHelper.password}" />
				<p:message for="password" />
				<div>
					<p:commandButton id="loginButton"
						actionListener="#{loginHelper.login}" value="Login"
						update="loginpage" styleClass="ui-priority-primary"/>
					<p:message for="loginButton" />
				</div>
				
				<h:link id="home" value="Go to homepage" outcome="index" ></h:link>
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>